package com.whpost.api.controller.wx;

import com.whpost.api.utils.ApiUtils;
import com.whpost.service.entity.tools.ResultInfo;
import com.whpost.service.wx.service.BaomingServices;
import com.whpost.service.wx.service.CyxxServices;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/wx/cyxx")
public class CyxxController {

    @Resource
    private CyxxServices cyxxServices;

    @RequestMapping(value ="/info")
    public ResultInfo info(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        return cyxxServices.info(loginId,map);
    }

    @RequestMapping(value ="/save")
    public ResultInfo save(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        return cyxxServices.save(loginId,map);
    }

    @RequestMapping(value ="/query")
    public ResultInfo query(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        return cyxxServices.query(loginId,map);
    }
}
